package com.firewolf.springboot.conf;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;
@ConfigurationProperties(prefix = "stu")//这是前缀
@PropertySource("classpath:stu.properties")//引入要使用的文件
@Component
public class MySelf2 {
	private String school;
	private String hobby;
	private String num;

	public String getSchool() {
		return school;
	}

	public void setSchool(String school) {
		this.school = school;
	}

	public String getHobby() {
		return hobby;
	}

	public void setHobby(String hobby) {
		this.hobby = hobby;
	}

	public String getNum() {
		return num;
	}

	public void setNum(String num) {
		this.num = num;
	}

	@Override
	public String toString() {
		return "MySelf2 [school=" + school + ", hobby=" + hobby + ", num=" + num + "]";
	}

}
